package com.partners.model;


import com.partners.constant.BusinessMessage;

/**
 * @author liangyongle
 * @date 2018/8/14 0014
 */
public class BusinessException  extends  RuntimeException{
    private BusinessMessage businessMessage;

    public BusinessException() {

    }

    public static BusinessException of(BusinessMessage businessMessage) {
        return new BusinessException(businessMessage);
    }



    private BusinessException(BusinessMessage businessMessage) {
        this.businessMessage = businessMessage;
    }

    public BusinessMessage getBusinessMessage() {
        return businessMessage;
    }

    public void setBusinessMessage(BusinessMessage businessMessage) {
        this.businessMessage = businessMessage;
    }

    @Override
    public synchronized Throwable fillInStackTrace() {
        return this;
    }


}
